package com.java.escape.dlcopy;

import java.util.Objects;

/**
 * @ClassName Main
 * @Description TODO
 * @Author wyp
 * @Date 2023/9/15 15:29
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) throws CloneNotSupportedException {
        Student student = new Student();
        student.setAge(1);
        student.setName("cct");
        Education education = new Education();
        education.setName("北京大学");
        student.setEducation(education);
        Student student1 = (Student) student.clone();
        System.out.println(student + ":" + student.hashCode());
        System.out.println(student1 + ":" + student.hashCode());
        System.out.println(student.equals(student1));
        System.out.println("--------------------------------");
        student1.setName("llh");
        student1.getEducation().setName("清华大学");
        System.out.println(student + ":" + student.hashCode());
        System.out.println(student1 + ":" + student.hashCode());
        System.out.println(student.equals(student1));
    }
}
